import requestWithToken from "@/utils/request";
import {SearchVO} from "@/typings";

export const getQrCode = () => {
    return requestWithToken("/invite/code/generate", "GET", {});
};
export const withdrawal = (amount: number) => {
    return requestWithToken("/invite/withdrawal", "GET", {amount});
};
export const invited = (invitorId: number) => {
    return requestWithToken("/invite/join", "GET", {invitorId});
};
export const listInvite = (searchVO: SearchVO) => {
    return requestWithToken("/invite/back/list", "GET", searchVO);
};
export const checkWithdrawal = (id: string) => {
    return requestWithToken("/invite/back/check", "GET", {id})
}
export const refuseWithdrawal = (id: string, reason: string) => {
    return requestWithToken("/invite/back/refuse", "GET", {id, reason})
}
export const INVITE_TYPE_INVITE = "邀请";
export const INVITE_TYPE_WITHDRAWAL = "提现";
export const INVITE_TYPE_EXTRACT = '抽成';